#include <AutoFree.h>
#include <string.h>

AutoFree::AutoFree(int len)
{
    m_buff = new char[len];
    if (m_buff)
    {
        memset((void*)m_buff, 0, len);
    }
}

AutoFree::~AutoFree()
{
    if (m_buff)
    {
        delete[] m_buff;
    }
    m_buff = NULL;
}